package com.naiterui.ehp.bs.recommend.bean;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * @author guoyongxiang
 * @date 2019/12/7 17:17
 * @since 1.0.0
 */
@Data
@Table(name = "recom_audit_operation_log")
@Entity
public class RecomAuditOperationLog {

    public static final int TYPE_SEND = 1;
    public static final int TYPE_DISTRIBUTION = 2;
    public static final int TYPE_REDISTRIBUTION = 3;
    public static final int TYPE_PASS = 4;
    public static final int TYPE_NO_PASS = 5;
    public static final int TYPE_ALLOCATE = 6;


    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 处方ID
     */
    @Column(name = "recom_id")
    private Long recomId;

    /**
     * 类型(1:医生推送处方, 2:系统分配给xx药师, 3:撤回处方, 4:药师审核通过,5:药师审核不通过,原因:xx)
     */
    @Column(name = "type")
    private Integer type;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    @Version
    private Integer version;

}
